import React, { Component } from 'react'

export class List extends Component {
  render() {
      const {newArr}=this.props
    return (
      <div>
          <ul>
          {
              newArr ?newArr.map((item,index)=>{
                  return <li> <span>{item.title}</span> 
                  <img  src={item.img}/> <span>{item.price}</span></li>
              }) :'暂无数据'
          }
          </ul>
      </div>
    )
  }
}

export default List